home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / Jogos de Azar / bjack.swf / scripts / DefineSprite_186 / frame_14 / DoAction.as
Text File  |  2006-01-17  |  3KB  |  123 lines

  1. if("10" < d and eval("_level0/action:deal") == "11")
  2. {
  3.    set("_level0/action:deal","1");
  4. }
  5. else if(d < "7" and eval("_level0/action:deal") == "11")
  6. {
  7.    set("_level0/action:TDdeal","1");
  8. }
  9. else
  10. {
  11.    set("_level0/action:deal",eval("_level0/action:deal"));
  12.    set("_level0/action:TDdeal",eval("_level0/action:deal"));
  13. }
  14. d += eval("_level0/action:deal");
  15. if(eval("_level0/action:TDdeal") == "1" or TDControl == "1")
  16. {
  17.    if(BJCpl1 + eval("_level0/action:deal") < "21")
  18.    {
  19.       TDControl = "1";
  20.       dt = d - "10";
  21.    }
  22.    else
  23.    {
  24.       dt = "";
  25.    }
  26. }
  27. if(eval("_level0:SplitForD") != "1")
  28. {
  29.    if(BJControl + eval("_level0/action:deal") == "21")
  30.    {
  31.       stop();
  32.       d = "BlackJack";
  33.       if(d eq eval("_level0/1Player:pl1"))
  34.       {
  35.          tellTarget("_level0/1Player/Message")
  36.          {
  37.             gotoAndStop("Push");
  38.          }
  39.       }
  40.       else
  41.       {
  42.          tellTarget("_level0/1Player/Message")
  43.          {
  44.             gotoAndStop("Lose");
  45.          }
  46.       }
  47.    }
  48.    if(BJControl + eval("_level0/action:deal") >= "17" and d ne "BlackJack")
  49.    {
  50.       stop();
  51.       if("21" < d)
  52.       {
  53.          tellTarget("_level0/1Player/Message")
  54.          {
  55.             gotoAndStop("DBusts");
  56.          }
  57.       }
  58.       if("21" >= d and eval("_level0/1Player:pl1") < d)
  59.       {
  60.          if(eval("_level0/1Player:pl1") ne "BlackJack")
  61.          {
  62.             tellTarget("_level0/1Player/Message")
  63.             {
  64.                gotoAndStop("Lose");
  65.             }
  66.          }
  67.          else
  68.          {
  69.             tellTarget("_level0/1Player/Message")
  70.             {
  71.                gotoAndStop("Win");
  72.             }
  73.          }
  74.       }
  75.       if("21" >= d and d < eval("_level0/1Player:pl1"))
  76.       {
  77.          tellTarget("_level0/1Player/Message")
  78.          {
  79.             gotoAndStop("Win");
  80.          }
  81.       }
  82.       if("21" >= d and d == eval("_level0/1Player:pl1"))
  83.       {
  84.          tellTarget("_level0/1Player/Message")
  85.          {
  86.             gotoAndStop("Push");
  87.          }
  88.       }
  89.    }
  90.    else if(d ne "BlackJack")
  91.    {
  92.       play();
  93.    }
  94. }
  95. else
  96. {
  97.    if(BJControl + eval("_level0/action:deal") == "21")
  98.    {
  99.       stop();
  100.       d = "BlackJack";
  101.       tellTarget("_level0/1Player/Message")
  102.       {
  103.          gotoAndStop("Lose2");
  104.       }
  105.    }
  106.    if(BJControl + eval("_level0/action:deal") >= "17" and d ne "BlackJack")
  107.    {
  108.       stop();
  109.       if("21" < d)
  110.       {
  111.          tellTarget("_level0/1Player/Message")
  112.          {
  113.             gotoAndStop("DBusts2");
  114.          }
  115.       }
  116.       call("TotSplit");
  117.    }
  118.    else if(d ne "BlackJack")
  119.    {
  120.       play();
  121.    }
  122. }
  123.